package com.wn.mapper;

import com.wn.ov.DepartmentUserOv;
import com.wn.ov.PatientOv;
import com.wn.ov.UserOv;
import com.wn.pojo.User;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;
@Component
public interface UserMapper {
    //主键删除（物理删除）
    int deleteByPrimaryKey(Integer id);
    //批量物理删除
     int deleteBatchUserTrue(List<Integer> ids);
    //批量逻辑删除
    int deleteBatchUserLogical(List<Integer> ids);

    int insert(User record);

    int insertSelective(User record);
    //主键查询
    User selectByPrimaryKey(Integer id);
    //根据主键动态修改
    int updateByPrimaryKeySelective(User record);
    //根据主键修改
    int updateByPrimaryKey(User record);

    //查动态查询
    User searchSomeByPage(User user);
    UserOv login(UserOv user);


    List<PatientOv> getPatientById(@Param("id") int id);

    //医生列表
    List<User> doctorList(Integer postId);
    List<User> doctorList();

    //查询护士列表
    List<User> getNurseList();

    //获取前端需要的信息
    UserOv getUserOvByUserId(Integer id);

    List<PatientOv> superSearch(String superSearchKeyWord,Integer id);

    User getPatientByName(String realName);
    //查询所有非病人user
    List<User> notPatientList();
    //非病人列表的高级检索
    List<User> superSearchNoPatient(String superSearchKeyWord );
    //个人信息
    DepartmentUserOv getUserMsgById(Integer id);
   //通过当前登录用户查询同科室医生
    List<User> selectByCurrentDept(Integer id);

}